<!DOCTYPE html>

<!--模拟考试-->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

</head>

<body>
    
<div id="app" v-cloak>   
        <el-form label-position=" right" ref="form" :inline="true" :model="formInline" class="demo-form-inline"
            style="margin-bottom: 15px;">
            <el-row>
                <el-col class="head-tool">
                    
<div class="new_title fl"><strong><img src="/static/images/icon1.png" />模拟考试列表</strong></div>
                    <span>
                        <btn-export-list url="xxxx" :forminline="this.formInline" linetype="3"></btn-export-list>
                        <btn :text="col.btnExamination" imgsrc="/static/images/general.png" linetype="4"
                            @click="OpenInput('tj')"></btn>
                    </span>
                </el-col>
            </el-row>
        </el-form>
        <el-col span="24">
            <el-table ref="table" stripe :data="ListItem.tableData" :row-key="getRowKeys" :height="ListItem.tableHeight"
                border @selection-change="handleSelectionChange" row-style="height:10px"
                style="width: 100%;height: 100%;">
                <!-- <el-table-column type="selection" style="
        padding-top: 0px;
        padding-bottom: 0px;
    " align="center" width="55" :reserve-selection="true">
                </el-table-column> -->
                <!-- 除第一列以外 遍历所有字段 -->
                <!--user建议替换为表名 需要与resource文件夹下js 中的对象保持一致  下同-->
                <el-table-column type="index" :label="col.SequenceNumber" :index="indexMethod" width="50"
                    show-overflow-tooltip="true"></el-table-column>
                <el-table-column prop="Nameoftestpaper" :label="Mockexam.Nameoftestpaper">
                </el-table-column>
                <el-table-column prop="Examinationmethods" :label="Mockexam.Examinationmethods">
                </el-table-column>
                <el-table-column prop="Examinationstarttime" :label="Mockexam.Examinationstarttime">
                </el-table-column>
                <el-table-column prop="Endtimeofexamination" :label="Mockexam.Endtimeofexamination">
                </el-table-column>
                <el-table-column prop="state" :label="Mockexam.state">
                </el-table-column>
                <el-table-column prop="Qualificationscore" :label="Mockexam.Qualificationscore">
                </el-table-column>
                <el-table-column prop="Numberofexaminations" :label="Mockexam.Numberofexaminations">
                </el-table-column>
                <el-table-column width="53" :label="col.btndetails" fixed="right">
                    <template slot-scope="scope">
                        <button type="button" class="elst-bt-xg" @click=UserInputStatistics('xg',scope.row.id)>
                            <i class="el-icon-tickets"></i>
                        </button>
                    </template>
                </el-table-column>
            </el-table>
            <el-row type="flex" justify="end">
                <el-pagination ref="page" @size-change="handleSizeChange" @current-change="handleCurrentChange"
                    :current-page="ListItem.currentPage" :page-sizes="ListItem.pagesizes" :page-size="ListItem.pagesize"
                    :layout="ListItem.layout" :total="ListItem.total">
                </el-pagination>

            </el-row>
            <!--user建议替换为表名 需要与resource文件夹下js 中的对象保持一致  -->
        </el-col>
        <el-dialog title="模拟考试" :visible.sync="ListItem.dialogVisible" @close='closeDialog' width="80%" height="80%"
            top="10vh" fullscreen="true">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">
        var app = new Vue({
            el: '#app',
            data: {
                ListItem: ListItem,

                Trainingcontent: [],
                isShow: true,
                formInline: {

                    // 遍历所有列 均为字符串即可
                    model: {
                        Name: '', Category: '', Teacher: '', LlearningTime: '', Courseware: '', IsEncrypted: '',
                    },
                    offset: 0,
                    limit: 10
                }
            },
            mounted: function () {
                this.GetPageData(1);
                tablehigh(this);
                this.Trainingcontent = getDicData('66');
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                indexMethod: function (index) {
                    return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1;
                },
                closeDialog: function () { closeDialog(this); },
                //Model 替换成 表名
                onDelete: function () { onDelete(this, '/api/Mockexam/DeleteMuti'); },

                handleSelectionChange: function (val) { handleSelectionChange(this, val); },
                //Model 替换成 表名
                OpenInput: function (val, id) { DialogShow(this, val, "OnlineexaminationInput.html", id); },
                UserInputStatistics: function (val, id) { DialogShow(this, val, "OnlineExaminationDetailsInput.html", id); },
                //Model 替换成 表名
                GetPageData: function (currentIndex) { GetPageData(this, currentIndex, '/api/Mockexam/GetList') },

                onSubmit: function () { onSubmit(this); },

                handleSizeChange: function (val) { handleSizeChange(this, val); },

                handleCurrentChange: function (val) { handleCurrentChange(this, val); },

                handleNodeClick: function (data) {
                    this.formInline.model.Category = data.id;
                    this.GetPageData(1);
                }
            }
        });
    </script>
</body>

</html>